package com.umeox.watch.moto.apiclient.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class TaskRecordInfoDTO implements Parcelable {

    public String requestId;
    public List<TaskRecordDTO> details;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.requestId);
        dest.writeTypedList(this.details);
    }

    public TaskRecordInfoDTO() {

    }

    protected TaskRecordInfoDTO(Parcel in) {
        this.requestId = in.readString();
        this.details = in.createTypedArrayList(TaskRecordDTO.CREATOR);
    }

    public static final Parcelable.Creator<TaskRecordInfoDTO> CREATOR = new Parcelable.Creator<TaskRecordInfoDTO>() {
        public TaskRecordInfoDTO createFromParcel(Parcel source) {
            return new TaskRecordInfoDTO(source);
        }

        public TaskRecordInfoDTO[] newArray(int size) {
            return new TaskRecordInfoDTO[size];
        }
    };

    @Override
    public String toString() {
        return "TaskRecordInfoDTO{" +
                "requestId='" + requestId + '\'' +
                ", details=" + details +
                '}';
    }
}
